/**
 * 
 */
package org.statewalker.parser.wiki.tokenizer;

import org.statewalker.parser.wiki.tokenizer.base.StreamToken;
import org.statewalker.tokenizer.base.CompositeTokenizer;
import org.statewalker.tokenizer.base.ITokenFactory;
import org.statewalker.tokenizer.stream.ICharStream.Pointer;
import org.statewalker.validator.IParseKey;

/**
 * @author kotelnikov
 */
public class CompositeStreamTokenizer extends CompositeTokenizer<StreamToken> {

    protected ITokenFactory<StreamToken> getFactory(final IParseKey key) {
        return new ITokenFactory<StreamToken>() {
            public StreamToken newToken(Pointer begin, Pointer end, String str) {
                return new StreamToken(key, begin, end, str);
            }
        };
    }

}